﻿@using ZBJF.Warranty.BLL
@using ZBJF.Warranty.Common.Enums.InsuranceWarranty
@using ZBJF.Warranty.Model
@model ZBJF.Warranty.Model.InsuranceWarrantyRecord
@{
    var expressSendByWhoType = (byte)PageData["ExpressSendByWhoType"];
    var expressInfo = ServiceFactory.InsuranceWarrantyRecordExpressInfoServiceInstance.Load(
            Model.ID, expressSendByWhoType);
}
@if (expressInfo == null)
{
    <h4>物流信息</h4>
}
else if (expressSendByWhoType == (byte)ExpressSendByWhoType.UserSendToPartitionCenter || expressSendByWhoType == (byte)ExpressSendByWhoType.PartitionCenterSendToRepairCenter)
{
    <h4>物流信息</h4>
    <table class="table table-responsive table-bordered table-hover">
        <tr>
            <th class="w120">寄件人：</th>
            <td class="w-p25">@expressInfo.SendUserName</td>
            <th class="w120">寄件人电话：</th>
            <td class="w-p25">@expressInfo.SendUserPhone</td>
        </tr>
        <tr>
            <th>寄件人地址：</th>
            <td>@expressInfo.SendUserAddress</td>
            <th>收件分拣中心：</th>
            <td>@Model.SortingCenter.SortingCenterName)</td>
        </tr>
        <tr>
            <th>快递公司：</th>
            <td>@(ZBJF.Warranty.Common.Common.EnumHelper.Instance.GetDescription(typeof(ExpressEnums), Model == null ? 0 : expressInfo.ExpressCompanyID))</td>
            <th>快递单号：</th>
            <td>@expressInfo.ExpressNo</td>
        </tr>
        <tr>
            <th>快递价格：</th>
            <td>@expressInfo.ExpressPrice</td>
            <th>总用时：</th>
            <td></td>
        </tr>
    </table>
}
else
{
    <h4>寄回物流信息</h4>
    <table class="table table-responsive table-bordered table-hover">
        <tr>
            <th class="w120">物流单号：</th>
            <td class="w-p25">@expressInfo.ExpressNo</td>
            <th class="w120">物流状态：</th>
            <td class="w-p25">@expressInfo.ExpressStatus</td>
        </tr>
        <tr>
            <th>快递公司：</th>
            <td>@(ZBJF.Warranty.Common.Common.EnumHelper.Instance.GetDescription(typeof(ExpressEnums), Model == null ? 0 : expressInfo.ExpressCompanyID))</td>
            <th>寄件人：</th>
            <td>@expressInfo.SendUserName</td>
        </tr>
        <tr>
            <th>寄件人电话：</th>
            <td>@expressInfo.SendUserPhone</td>
            <th>收件人：</th>
            <td>@expressInfo.ReceiverUserName</td>
        </tr>
        <tr>
            <th>收件人电话：</th>
            <td>@expressInfo.ReceiverUserPhone</td>
            <th>收件人地址：</th>
            <td>@expressInfo.ReceiverUserAddress</td>
        </tr>
    </table>
}